package com.ryl;

import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.Executors;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;

/**
 * @Date 17:01
 * @Author ryl
 * 线程池
 */

public class ThreadPoolExecutorTest {
    ThreadPoolExecutor pool = new ThreadPoolExecutor(// 自定义一个线程池

            1, // coreSize

            2, // maxSize

            60, // 60s

            TimeUnit.SECONDS, new ArrayBlockingQueue<> (3) // 有界队列，容量是3个

            , Executors.defaultThreadFactory()

            , new ThreadPoolExecutor.AbortPolicy()

    );
    StringBuilder sb=new StringBuilder ( "aaaa" );
    StringBuffer sb1=new StringBuffer ( "bbbb" );

    public static void main(String[] args) {
        System.out.println (4&7 );
        int []a[]=new int[10][10];
    }

}
